package com.mf.repository;

import com.mf.entity.SpecItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author: Jiang Runqing
 * @date: 2018-09-09 16:59
 */
public interface SpecItemRepository extends JpaRepository<SpecItem, Integer>, JpaSpecificationExecutor<SpecItem> {

    @Query(value = "SELECT * FROM tp_spec_item WHERE spec_id = ?1", nativeQuery = true)
    List<SpecItem> findListBySpecId(int specId);
}
